<?php

namespace app\backend\validator;

use think\Validate;

class AddManagerValidator extends Validate
{
    protected $rule = [
        'username' => 'require|alphaNum|min:4|max:18',
        'password' => 'require|alphaNum|min:6|max:12',
    ];

    protected $message = [
        'username.require' => '管理员账号必填',
        'username.min' => '账号长度不能小于4个字符',
        'username.max' => '账号长度不能超过18个字符',
        'password.require' => '密码必填',
        'password.min' => '密码长度不能小于6个字符',
        'password.max' => '密码长度不能超过12个字符',
    ];
}